
<ul class="media-list">
    {% for comment in courseComments %}
        <li class="media">
            <a class="pull-left"><img src="{{ asset(comment.headPic) }}" width="80" height="80" style="border-radius: 80px;" class="img-rounded" alt="" /></a>
            <div class="media-body">
                <div class="media-heading">
                    <strong id="userName_p{{ comment.id }}">{{ comment.nickName ? comment.nickName : comment.account }}</strong> - <time>{{ comment.time | date("Y/m/d H:i:s") }}</time>
                    <a href="javascript:createReplyForm('{{ comment.id }}','p{{ comment.id }}');" class="pull-right btn btn-dark"><i class="fa fa-reply"></i> 回复</a>
                </div>
                <p>[评]{{ comment.what }}</p>
                <div id="ReplyBox_{{ comment.id }}" style="padding: 10px;display: none">
                    <form class="form" role="form" id="CommentsReplyAdd_{{ comment.id }}">
                        <input type="hidden" name="id" value="{{ comment.id }}"/>
                        <div class="row" style="padding: 14px;">
                            <textarea id="input_{{ comment.id }}" name="content" class="form-control" rows="6" id="fieldInputMessage" placeholder="来一起说一说谈一谈"></textarea>
                        </div>
                        <p class="text-right">
                            <input onclick="commentsReplySubmit('{{ comment.id }}')" type="button" class="btn btn-green" value="回复" />
                        </p>
                    </form>
                </div>
                {% if comment.reply %}
                    {% for c in comment.reply %}
                        <div class="media">
                            <a class="pull-left"><img src="{{ asset(app.user.headPic) }}" width="80" height="80" style="border-radius: 80px;" class="img-rounded" alt="" /></a>
                            <div class="media-body">
                                <div class="media-heading">
                                    <strong id="userName_{{ c.id }}">{{ c.nickName ? c.nickName : c.account }}</strong> - <time>{{ c.time | date("Y/m/d H:i:s") }}</time>
                                    <a href="javascript:createReplyForm('{{ comment.id }}','{{ c.id }}');" class="pull-right btn btn-dark"><i class="fa fa-reply"></i> 回复</a>
                                </div>
                                <p>[评]{{ c.what }}</p>
                            </div>
                        </div>
                    {% endfor %}
                {% endif %}
            </div>
        </li>
    {% endfor %}
</ul>

<hr class="invisible" />
{{ page | raw }}